#include<stdio.h>
#include<math.h>
double func(int a,int b,int c,int d)
{
	double res;
	res=sqrt((a-c)*(a-c)+(b-d)*(b-d));
	return res;
}
int main ()
{
	int t;
	scanf("%d",&t);
	double a,b,c,d;
	double result;
	while(t--)
	{
		scanf("%lf %lf %lf %lf",&a,&b,&c,&d);
		result=func(a,b,c,d);
		printf("%.1lf\n",result);
	}
	return 0;
}
